<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>微圈文章添加</title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <link rel="stylesheet" href="/ztree/css/metroStyle/metroStyle.css"/>
    <script src="/ztree/js/jquery.ztree.all.min.js"></script>
    <style>
        .layui-input{
            width: 350px;
        }
    </style>
</head>
<body>
 <div style="width: 900px; height: 1500px; margin-top: 50px; margin: 0 auto">
     <div class="layui-form" lay-filter="layForm" style="width: 700px;">
         <div class="layui-form-item layui-row">
             <label class="layui-form-label">文章标题：</label>
             <div class="layui-input-inline">
                 <input class="layui-input" type="text" placeholder="文章标题" />
                 <input type="hidden" id="acticleCategroyId" />
             </div>
             <div  style="float: right;">
                 <input type="button" class="layui-btn" onclick="draft()" value="保存草稿" />
                 <input type="button" class="layui-btn" onclick="release()" value="发布文章"/>
             </div>
         </div>
         <div class="layui-form-item layui-row">
             <label class="layui-form-label">内容类型：</label>
             <div class="layui-input-inline">
                 <input class="layui-input" type="text" placeholder="内容类型"/>
             </div>
             <div>                     <!--选择-->
                 <i class="layui-icon layui-icon-layer" style="font-size: 30px; float: right; padding-right: 175px;" onclick="ArticleClassification()"></i>
             </div>
         </div>
         <div class="layui-form-item layui-row">
             <textarea lay-verify="area" id="area" style="width: 675px; height: 500px; margin-left: 23px;"></textarea>
         </div>

     </div>
 </div>
</body>
    <script>
        var form;
        var $;
        var table;
        var layer;
        var upload;
        var node;
        var layedit;
        var user = JSON.parse(localStorage.getItem("user"));
        var userId = user.userId;
        layui.use(['form','jquery','table','layer','upload','layedit'],function() {
            form = layui.form;
            $ = layui.jquery;
            table = layui.table;
            layer = layui.layer;
            upload = layui.upload;
            layedit = layui.layedit;

            layedit.build("area",{
                height:500
            });
            //保存草稿
            draft = function draft(){
                var layForm = form.val("layForm");
            }
            //发布文章
            release = function release() {
                var layForm = form.val("layForm");
            }
            //选择文章分类
            ArticleClassification = function ArticleClassification() {
                layer.open({
                    type:2,
                    title:"文章分类",
                    area:["500px","500px"],
                    content:"article-classification.html",
                });
            }

        });
    </script>
</html>